﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MainRole.aspx.cs" Inherits="UserManagement_MainRole" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<link href="../css/Style.css" rel="stylesheet" type="text/css" />
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>角色管理列表</title>
    <style type="text/css">
        #menu
        {
            width: 194px;
        }
        #Right
        {
            width: 103%;
        }
        #User
        {
            width: 251px;
        }
    </style>
    <link href="../Includes/index.css" type="text/css" rel="stylesheet" />
    <link href="../Includes/MasterPage.css" type="text/css" rel="stylesheet" />
    <link href="../Includes/xtree.css" type="text/css" rel="stylesheet" />
    <link href="../css/MyCss.css" type="text/css" rel="stylesheet" />
    <link href="../css/Style.css" rel="stylesheet" type="text/css" />
</head>
<script src="../js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="../Includes/jquery-1.4.1.js" type="text/javascript"></script>
<script src="../Includes/MyJScript.js" type="text/javascript"></script>
 <script language="javascript" type="text/javascript">
 var getAllNodes ="";
function closethis()
{
document.all.dir.style.display='none';
}
function openthis()
{
document.all.dir.style.display='';
}
function showUser() {
    var roleId = window.frames["menu"].document.all("nodesvalue").value;
    if (roleId == "") {
        alert("请选择角色！");

    } else {
    var left, top;
    //if (screen.width != 800) { sw = 1024; sh = 768; }
    left = screen.width/ 2;
    top = screen.height/ 4;
    //window.showModalDialog("RoleUserList.aspx?roleId=" + roleId, window, "dialogWidth=290px;dialogHeight=350px;scroll=no");
    window.open("RoleUserList.aspx?roleId=" + roleId,"_blank","toolbar=no,location=no,directories=no,status=yes,resizable=no,menubar=no,scrollbars=no,left=" + left + ",top=" + top + ",height=500px,width=280px");
    }

}


//function GeSelectedNode() {
//    //alert("123");
//    //var tree = window.frames["Right"].document.all("roleRightTreeView");
////    var dd = document.all("Right").contentWindow.document;
////    var tree = dd.getElementById("roleRightTreeView");
////    alert(tree);
//    for (var i = 0; i < tree.length; i++) {
//        if (tree[i].type == "checkbox" && tree[i].checked) {
//            getAllNodes += tree[i].nextSibling.firstchildnode.nodevalue;
//            alert(getAllNodes);
//        }
//    }
//}


function saveResource() {

    var roleId = window.frames["menu"].document.all("nodesvalue").value;
    //alert(roleId);
    window.open("MainRoleRight.aspx?roleId=" + roleId+"&&addrr=1", "Right", "");
    
}
</script>

<body>
    <form id="mainrole" runat="server">
    <div class="inputbuttondiv">
     <%--<input class="btn" id="handle" type="button" value="提交" onclick="saveResource()" />--%>
      <%--<asp:Button class="btn" ID="addrr" runat="server" Text="提交" onclick="addrr_Click" 
             />--%>
        <%--&nbsp;
        <asp:Button class="btn" ID="useradd" runat="server" Text="增加" 
             />
        &nbsp;<asp:Button class="btn" ID="userupdate" runat="server" Text="修改" 
            />
        &nbsp;<asp:Button class="btn" ID="userdel" runat="server" Text="删除" 
            />--%>
        &nbsp;<asp:Button class="inputbutton" ID="userprt" runat="server" Text="打印" Visible="false"/>
        &nbsp;<%--<asp:Button class="btn" ID="adduser" runat="server" Text="用户" 
            onclick="showUser()" />--%>
        <input class="inputbutton" id="showuser" type="button" value="用户" onclick="showUser()" />
        
    &nbsp;</div>
    <div>
    <table border="0" width="100%" cellpadding="0" class="main-table" border="1">
<tr>
         <td align="left" id=dir style="width:18%">   
   <iframe id="menu" name="menu" src="MainRoleLeft.aspx" class="inset-table" height="500" 
                frameborder="1" marginheight="0" marginwidth="0"
                 >
   </iframe>                                                                                                                                                                                              
      </td> 
      <%-- <td width="2%" align=center><a href="javascript:closethis();"><=</a><br><br><br><a href="javascript:openthis();">=></a></td>--%>
      <td align="left" style="width:40%">
      <iframe id="Right" name="Right" src="MainRoleRight.aspx" class="outset-table" 
              height="500" frameborder="1" marginheight="0" marginwidth="0" align=middle scrolling="auto">
      </iframe> 
      </td>  
      
      <td align="left" style="width:40%">
      <iframe id="User" name="User" src="MainRoleUser.aspx" class="outset-table" 
              height="500" frameborder="1" marginheight="0" marginwidth="0" framespacing="0" noresize align=middle>
      </iframe> 
      </td>  
                                                                                                                                                                                       
   </tr>                                                                                                                                                                                           
</table> 

    </div>
    </form>
</body>
</html>
